local action, para = msg.suffix:match("^[%s]*([^%s]+)[%s]*(.-)[%s]*$")
local function intostr(num)
    return string.format("%d",math.floor(num or 0))
end
if action == "show" then
    local li = {}
    if para=="" then
        para = "状态"
        local overview_card = loadLua("COC7.overview")
        for i,uid in ipairs(msg.game.pls:totable()) do
            local pc = getPlayerCard(uid,msg.gid)
            table.insert(li, overview_card(pc))
        end
    else
        for i,uid in ipairs(msg.game.pls:totable()) do
            local pc = getPlayerCard(uid,msg.gid)
            local val = pc[para]
            if val then
                table.insert(li, pc.__Name ..":"..val)
            end
        end
    end
    msg.attr = para
    msg.li = table.concat(li,"\n")
    return "调查员们的{attr}如下——\n{li}"
elseif action == "roll" then
    local li = {}
    for i,uid in ipairs(msg.game.pls:totable()) do
        local pc = getPlayerCard(uid,msg.gid)
        local rd = pc:rollDice(para)
        if rd.error then
            msg.expr = rd.expr
            return "掷骰表达式{expr}不合法！"
        elseif #li==0 then
            table.insert(li, rd.expr)
        end
        table.insert(li, pc.__Name ..": "..rd.expansion)
    end
    msg.li = table.concat(li,"\n")
    return "{strTeamRoll}"
else
    return "{help:team}"
end